
#ifdef FLASH_CODE_HEADER

static const uint32_t flash_code_GD32F30X_CL[116] = 
{
    0XE00ABE00,0X062D780D,0X24084068,0XD3000040,0X1E644058,0X1C49D1FA,0X2A001E52,0X4770D1F2,
    0XF36F4964,0X44490012,0X48636008,0X60012100,0X60424A62,0X60414962,0X64416442,0X074069C0,
    0X4860D408,0X5155F245,0X21066001,0XF6406041,0X608171FF,0X47702000,0X69014857,0X0180F041,
    0X6D016101,0X0180F041,0X20006501,0X48524770,0XF0416901,0X61010104,0XF0416901,0X61010140,
    0X22AAF64A,0XE000494F,0X68C3600A,0XD1FB07DB,0XF0236903,0X61030304,0XF0436D03,0X65030304,
    0XF0436D03,0X65030340,0X600AE000,0X07DB6CC3,0X6D01D1FB,0X0104F021,0X20006501,0X493D4770,
    0X4449B510,0X680C4A3F,0XF504493B,0XF64A2400,0X42A023AA,0X690CD212,0X0402F044,0X6148610C,
    0XF0406908,0X61080040,0X6013E000,0X07C068C8,0X6908D1FB,0X0002F020,0XE0116108,0XF0446D0C,
    0X650C0402,0X6D086548,0X0040F040,0XE0006508,0X6CC86013,0XD1FB07C0,0XF0206D08,0X65080002,
    0XBD102000,0XB5104B23,0X1CC9444B,0X4B22681C,0X2400F504,0X0103F021,0XD31942A0,0X691CE035,
    0X0401F044,0X6814611C,0X68DC6004,0XD1FC07E4,0XF024691C,0X611C0401,0XF01468DC,0XD0040F14,
    0XF04068D8,0X60D80014,0X1D00E01A,0X1F091D12,0XD1E42900,0X6D1CE01B,0X0401F044,0X6814651C,
    0X6CDC6004,0XD1FC07E4,0XF0246D1C,0X651C0401,0XF0146CDC,0XD0050F14,0XF0406CD8,0X64D80014,
    0XBD102001,0X1D121D00,0X29001F09,0X2000D1E3,0X0000BD10,0X00000004,0X40022000,0X45670123,
    0XCDEF89AB,0X40003000,0X00000000,0X00000000,
};

static const program_target_t flash_algo_GD32F30X_CL =
{
    0X20000021,  // Init
    0X20000059,  // UnInit
    0X2000006F,  // EraseChip
    0X200000BF,  // EraseSector
    0X20000125,  // ProgramPage

    {
        0x20000001,  // BKPT : start of blob + 1
        0x20000C00,  // RSB  : address to access global/static data
        0x20001000,  // RSP  : stack pointer 
    },

    0x20000400,                      // mem buffer location
    0x20000000,                      // location to write prog_blob in target RAM
    sizeof(flash_code_GD32F30X_CL),       // prog_blob size
    flash_code_GD32F30X_CL,               // address of prog_blob 
    0x00000400,                      // ram_to_flash_bytes_to_be_written
};

#endif

#ifdef FLASH_CODE_TABLE
&flash_algo_GD32F30X_CL
#endif

